[id].vue 94 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531
  1. <template>
  2. <div>
  3. <!-- 页面头部 -->
  4. <HomePageHead></HomePageHead>
  5. <!-- 页面导航 -->
  6. <HomePageNavigation></HomePageNavigation>
  7. <!-- 二级标题-->
  8. <HomeSecondaryHeading :titleName="routeName" :titleData="pageCategory"></HomeSecondaryHeading>
  9. <!-- {{ name }} -->
  10. <!-- 第一层 -->
  11. <div class="farmingPartOne">
  12. <div class="inner">
  13. <div class="innerLeft" v-if="pageData[0]">
  14. <div class="title">
  15. <h3>
  16. <NuxtLink :to="{ path: `/newsList/${pageData[0].cid}`}" target="_blank" v-if="pageData[0]">
  17. {{ pageData[0].title }}
  18. </NuxtLink>
  19. <span>
  20. <NuxtLink
  21. :to="{ path: `/newsList/${pageData[0].cid}`}"
  22. target="_blank" v-if="pageData[0]">查看更多</NuxtLink>
  23. </span>
  24. </h3>
  25. </div>
  26. <div class="leftTop">
  27. <div class="leftTopPhoto left" >
  28. <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[0].data[0]&&pageData[0].data[0].islink==1">
  29. <img :src="pageData[0].data[0].imgurl">
  30. <span>{{pageData[0].data[0].title }}</span>
  31. </NuxtLink>
  32. <NuxtLink :to="{ path: `/newsDetail/${pageData[0].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  33. target="_blank" v-if="pageData[0].data[0]&&pageData[0].data[0].islink==0">
  34. <img :src="pageData[0].data[0].imgurl">
  35. <span>{{pageData[0].data[0].title}}</span>
  36. </NuxtLink>
  37. </div>
  38. <ul class="left">
  39. <li v-for="item in pageData[0].data">
  40. <em></em>
  41. <span>
  42. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  43. <NuxtLink
  44. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  45. target="_blank" v-if="item.islink==0">{{ item.title }}
  46. </NuxtLink>
  47. </span>
  48. </li>
  49. </ul>
  50. </div>
  51. <ul class="leftBottom" v-if="pageData[0]">
  52. <li v-for="item in pageData[0].data2">
  53. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  54. <img :src="item.imgurl">
  55. </NuxtLink>
  56. <NuxtLink
  57. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  58. target="_blank" v-if="item.islink==0">
  59. <img :src="item.imgurl">
  60. </NuxtLink>
  61. <p>
  62. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  63. <NuxtLink
  64. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  65. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  66. </p>
  67. </li>
  68. </ul>
  69. </div>
  70. <div class="innerRight" v-if="pageData[1].cid!=''">
  71. <div class="title">
  72. <h3>
  73. <NuxtLink :to="{ path: `/newsList/${pageData[1].cid}`}" target="_blank" v-if="pageData[1]">
  74. {{ pageData[1].title }}
  75. </NuxtLink>
  76. <span>
  77. <NuxtLink
  78. :to="{ path: `/newsList/${pageData[1].cid}`}"
  79. v-if="pageData[1]" target="_blank">查看更多</NuxtLink>
  80. </span>
  81. </h3>
  82. </div>
  83. <ul class="rightList">
  84. <li v-for="item in pageData[1].data">
  85. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  86. <NuxtLink
  87. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  88. target="_blank" v-if="item.islink==0">
  89. <img class="left" :src="item.imgurl">
  90. </NuxtLink>
  91. <p class="left">
  92. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  93. <NuxtLink
  94. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  95. target="_blank" v-if="item.islink==0">
  96. {{ item.title }}
  97. </NuxtLink>
  98. </p>
  99. </li>
  100. </ul>
  101. </div>
  102. </div>
  103. </div>
  104. <!-- 三农资讯logo -->
  105. <HomeTopTen :imgurl="adList[0]" v-if="adList[0]"></HomeTopTen>
  106. <!-- 第二层 -->
  107. <div class="farmingPartTwo" v-if="pageData[2].cid!=''&&pageData[3].cid!=''&&pageData[4].cid!=''">
  108. <div class="inner">
  109. <div class="farmer" v-if="pageData[2].cid!=''">
  110. <div class="title">
  111. <h3>
  112. <NuxtLink :to="{ path: `/newsList/${pageData[2].cid}`}" target="_blank" v-if="pageData[2]">
  113. {{ pageData[2].title }}
  114. </NuxtLink>
  115. <span>
  116. <NuxtLink
  117. :to="{ path: `/newsList/${pageData[2].cid}`, query: { catid: pageData[2].cid } }"
  118. v-if="pageData[2]" target="_blank">查看更多</NuxtLink>
  119. </span>
  120. </h3>
  121. </div>
  122. <div class="PartTwoPhoto" v-if="pageData[2].data[0]">
  123. <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[2].data[0].islink==1">
  124. <img :src="pageData[2].data[0].imgurl">
  125. <span>{{ pageData[2].data[0].title }}</span>
  126. </NuxtLink>
  127. <NuxtLink
  128. :to="{ path: `/newsDetail/${pageData[2].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  129. target="_blank" v-if="pageData[2].data[0].islink==0">
  130. <img :src="pageData[2].data[0].imgurl">
  131. <span>{{ pageData[2].data[0].title }}</span>
  132. </NuxtLink>
  133. </div>
  134. <ul class="PartTwoList">
  135. <li v-for="item in pageData[2].data">
  136. <em></em>
  137. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  138. <NuxtLink
  139. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  140. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  141. </li>
  142. </ul>
  143. </div>
  144. <div class="farmer" v-if="pageData[3].cid!=''">
  145. <div class="title">
  146. <h3>
  147. <NuxtLink :to="{ path: `/newsList/${pageData[3].cid}`}" target="_blank" v-if="pageData[3]">
  148. {{ pageData[3].title }}
  149. </NuxtLink>
  150. <span>
  151. <NuxtLink
  152. :to="{ path: `/newsList/${pageData[3].cid}`, query: { catid: pageData[3].cid } }"
  153. v-if="pageData[3]" target="_blank">查看更多</NuxtLink>
  154. </span>
  155. </h3>
  156. </div>
  157. <div class="PartTwoPhoto" v-if="pageData[3].data[0]">
  158. <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[3].data[0].islink==1">
  159. <img :src="pageData[3].data[0].imgurl">
  160. <span>{{ pageData[3].data[0].title }}</span>
  161. </NuxtLink>
  162. <NuxtLink
  163. :to="{ path: `/newsDetail/${pageData[3].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  164. target="_blank" v-if="pageData[3].data[0].islink==0">
  165. <img :src="pageData[3].data[0].imgurl">
  166. <span>{{ pageData[3].data[0].title }}</span>
  167. </NuxtLink>
  168. </div>
  169. <ul class="PartTwoList">
  170. <li v-for="item in pageData[3].data">
  171. <em></em>
  172. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  173. <NuxtLink
  174. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  175. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  176. </li>
  177. </ul>
  178. </div>
  179. <div class="farmer" v-if="pageData[4].cid!=''">
  180. <div class="title">
  181. <h3>
  182. <NuxtLink :to="{ path: `/newsList/${pageData[4].cid}`}" target="_blank" v-if="pageData[4]">
  183. {{ pageData[4].title }}
  184. </NuxtLink>
  185. <span>
  186. <NuxtLink
  187. :to="{ path: `/newsList/${pageData[4].cid}`, query: { catid: pageData[4].cid } }"
  188. v-if="pageData[4]" target="_blank">查看更多</NuxtLink>
  189. </span>
  190. </h3>
  191. </div>
  192. <div class="PartTwoPhoto" v-if="pageData[4].data[0]">
  193. <NuxtLink :to="item.linkurl" target="_blank" v-if="pageData[4].data[0].islink==1">
  194. <img :src="pageData[4].data[0].imgurl">
  195. <span>{{ pageData[4].data[0].title }}</span>
  196. </NuxtLink>
  197. <NuxtLink
  198. :to="{ path: `/newsDetail/${pageData[4].data[0].id}`, query: { listId: routeId, listName: routeName } }"
  199. target="_blank" v-if="pageData[4].data[0].islink==0">
  200. <img :src="pageData[4].data[0].imgurl">
  201. <span>{{ pageData[4].data[0].title }}</span>
  202. </NuxtLink>
  203. </div>
  204. <ul class="PartTwoList">
  205. <li v-for="item in pageData[4].data">
  206. <em></em>
  207. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  208. <NuxtLink
  209. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  210. target="_blank" v-if="item.islink==0">
  211. {{ item.title }}
  212. </NuxtLink>
  213. </li>
  214. </ul>
  215. </div>
  216. </div>
  217. </div>
  218. <!-- 三农资讯logo -->
  219. <HomeTopTen :imgurl="adList[1]" v-if="adList[1]"></HomeTopTen>
  220. <!-- 第三层 -->
  221. <div class="zixuntuijian" v-if="pageData[5].cid!=''&&pageData[6].cid!=''&&pageData[7].cid!=''&&pageData[8].cid!=''&&pageData[9].cid!=''">
  222. <div class="inner">
  223. <div class="innerLeft" >
  224. <div class="zixunTop">
  225. <div class="zixunLeft" v-if="pageData[5].cid!=''">
  226. <div class="title">
  227. <h3>
  228. <NuxtLink :to="{ path: `/newsList/${pageData[5].cid}`}" target="_blank" v-if="pageData[5]">
  229. {{ pageData[5].title }}
  230. </NuxtLink>
  231. <span>
  232. <NuxtLink
  233. :to="{ path: `/newsList/${pageData[5].cid}`, query: { catid: pageData[5].cid } }"
  234. v-if="pageData[5]" target="_blank">查看更多</NuxtLink>
  235. </span>
  236. </h3>
  237. </div>
  238. <ul class="photo_text">
  239. <li v-for="(item, index) in pageData[5].data">
  240. <article v-if="index == 0">
  241. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  242. <img :src="item.imgurl" alt="">
  243. </NuxtLink>
  244. <NuxtLink
  245. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  246. target="_blank" v-if="item.islink==0">
  247. <img :src="item.imgurl" alt="">
  248. </NuxtLink>
  249. <div>
  250. <h5>
  251. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  252. <NuxtLink
  253. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  254. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  255. </h5>
  256. <p>
  257. <span>{{ item.author }}</span>
  258. <span>{{ getDays(item.created_at) }}</span>
  259. </p>
  260. </div>
  261. </article>
  262. <article v-else>
  263. <em></em>
  264. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  265. <NuxtLink
  266. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  267. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  268. </article>
  269. </li>
  270. </ul>
  271. </div>
  272. <div class="zixunRight" v-if="pageData[6].cid!=''">
  273. <div class="title">
  274. <h3>
  275. <NuxtLink :to="{ path: `/newsList/${pageData[6].cid}`}" target="_blank" v-if="pageData[6]">
  276. {{ pageData[6].title }}
  277. </NuxtLink>
  278. <span>
  279. <NuxtLink
  280. :to="{ path: `/newsList/${pageData[6].cid}`, query: { catid: pageData[6].cid } }"
  281. v-if="pageData[6]" target="_blank">查看更多</NuxtLink>
  282. </span>
  283. </h3>
  284. </div>
  285. <div class="towPic">
  286. <div v-for="(item, index) in pageData[6].data" class="picBox">
  287. <div v-if="index <= 1">
  288. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  289. <img :src="item.imgurl">
  290. </NuxtLink>
  291. <NuxtLink
  292. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  293. target="_blank" v-if="item.islink==0">
  294. <img :src="item.imgurl">
  295. </NuxtLink>
  296. </div>
  297. </div>
  298. </div>
  299. <ul class="photo_text">
  300. <li v-for="(item, index) in pageData[6].data">
  301. <article v-if="index > 1">
  302. <em></em>
  303. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  304. <NuxtLink
  305. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  306. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  307. </article>
  308. </li>
  309. </ul>
  310. </div>
  311. </div>
  312. <div class="zixunBottom" v-if="pageData[6].cid!=''">
  313. <img class="left" :src="pageData[7].data[0].imgurl"
  314. v-if="pageData[7].data[0] && hoverStatus == 0">
  315. <img class="left" :src="pageData[7].data[1].imgurl"
  316. v-if="pageData[7].data[0] && hoverStatus == 1">
  317. <img class="left" :src="pageData[7].data[2].imgurl"
  318. v-if="pageData[7].data[0] && hoverStatus == 2">
  319. <img class="left" :src="pageData[7].data[3].imgurl"
  320. v-if="pageData[7].data[0] && hoverStatus == 3">
  321. <img class="left" :src="pageData[7].data[4].imgurl"
  322. v-if="pageData[7].data[0] && hoverStatus == 4">
  323. <img class="left" :src="pageData[7].data[5].imgurl"
  324. v-if="pageData[7].data[0] && hoverStatus == 5">
  325. <ul class="leftList left">
  326. <li v-for="(item, index) in pageData[7].data" @mouseenter="qhPic(index)">
  327. <h4>
  328. <em></em>
  329. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  330. <NuxtLink
  331. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  332. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  333. </h4>
  334. </li>
  335. </ul>
  336. </div>
  337. </div>
  338. <div class="innerRight" v-if="pageData[8].cid!=''">
  339. <div class="title">
  340. <h3>
  341. <NuxtLink :to="{ path: `/newsList/${pageData[8].cid}`}" target="_blank" v-if="pageData[8]">
  342. {{ pageData[8].title }}
  343. </NuxtLink>
  344. <span>
  345. <NuxtLink
  346. :to="{ path: `/newsList/${pageData[8].cid}`, query: { catid: pageData[8].cid } }"
  347. v-if="pageData[8]" target="_blank">查看更多</NuxtLink>
  348. </span>
  349. </h3>
  350. </div>
  351. <ul class="information">
  352. <li v-for="item in pageData[8].data">
  353. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  354. <img :src="item.imgurl">
  355. </NuxtLink>
  356. <NuxtLink
  357. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  358. target="_blank" v-if="item.islink==0">
  359. <img :src="item.imgurl">
  360. </NuxtLink>
  361. <div class="text">
  362. <h5>
  363. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  364. <NuxtLink :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }" target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  365. </h5>
  366. <p>{{ item.author }}</p>
  367. </div>
  368. </li>
  369. </ul>
  370. </div>
  371. </div>
  372. </div>
  373. <HomeTopTen :imgurl="adList[2]" v-if="adList[2]"></HomeTopTen>
  374. <div class="farming" v-if="pageData[9].cid!=''&&pageData[10].cid!=''&&pageData[11].cid!=''">
  375. <div class="inner">
  376. <div class="innerLeft" v-if="pageData[9].cid!=''">
  377. <div class="farmer">
  378. <h3>
  379. <NuxtLink :to="{ path: `/newsList/${pageData[9].cid}`}" target="_blank" v-if="pageData[9]">
  380. {{ pageData[9].title }}
  381. </NuxtLink>
  382. <span>
  383. <NuxtLink
  384. :to="{ path: `/newsList/${pageData[9].cid}`, query: { catid: pageData[9].cid } }"
  385. v-if="pageData[9]" target="_blank">查看更多</NuxtLink>
  386. </span>
  387. </h3>
  388. <ul>
  389. <li v-for="item in pageData[9].data">
  390. <em></em>
  391. <span>
  392. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  393. <NuxtLink
  394. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  395. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  396. </span>
  397. </li>
  398. </ul>
  399. </div>
  400. <div class="farmer">
  401. <h3>
  402. <NuxtLink :to="{ path: `/newsList/${pageData[10].cid}`}" target="_blank" v-if="pageData[10]">
  403. {{ pageData[10].title }}
  404. </NuxtLink>
  405. <span>
  406. <NuxtLink
  407. :to="{ path: `/newsList/${pageData[10].cid}`, query: { catid: pageData[10].cid } }"
  408. target="_blank" v-if="pageData[10]">查看更多</NuxtLink>
  409. </span>
  410. </h3>
  411. <ul>
  412. <li v-for="item in pageData[10].data">
  413. <em></em>
  414. <span>
  415. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  416. <NuxtLink
  417. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  418. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  419. </span>
  420. </li>
  421. </ul>
  422. </div>
  423. </div>
  424. <div class="innerRight" v-if="pageData[11].cid!=''">
  425. <h3>
  426. <NuxtLink :to="{ path: `/newsList/${pageData[11].cid}`}" target="_blank" v-if="pageData[11]">
  427. {{ pageData[11].title }}
  428. </NuxtLink>
  429. <span>
  430. <NuxtLink
  431. :to="{ path: `/newsList/${pageData[11].cid}`, query: { catid: pageData[11].cid } }"
  432. target="_blank" v-if="pageData[11]">查看更多</NuxtLink>
  433. </span>
  434. </h3>
  435. <div class="banner">
  436. <HomeSmallSwiper :swiperData="pageData[11].data"></HomeSmallSwiper>
  437. </div>
  438. <div class="banner_b_img">
  439. <div class="photo">
  440. <article v-for="(item, index) in pageData[11].data2">
  441. <div class="photoL" v-if="index == 0">
  442. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  443. <img :src="item.imgurl">
  444. <span>{{ item.title }}</span>
  445. </NuxtLink>
  446. <NuxtLink
  447. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  448. target="_blank" v-if="item.islink==0">
  449. <img :src="item.imgurl">
  450. <span>{{ item.title }}</span>
  451. </NuxtLink>
  452. </div>
  453. <div class="photoL" v-if="index == 1">
  454. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  455. <img :src="item.imgurl">
  456. <span>{{ item.title }}</span>
  457. </NuxtLink>
  458. <NuxtLink
  459. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  460. target="_blank" v-if="item.islink==0">
  461. <img :src="item.imgurl">
  462. <span>{{ item.title }}</span>
  463. </NuxtLink>
  464. </div>
  465. </article>
  466. </div>
  467. </div>
  468. <div class="banner_text_list">
  469. <ul>
  470. <li v-for="item in pageData[11].data3">
  471. <em></em>
  472. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  473. <span>{{ item.title }}</span>
  474. </NuxtLink>
  475. <NuxtLink
  476. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  477. target="_blank" v-if="item.islink==0">
  478. <span>{{ item.title }}</span>
  479. </NuxtLink>
  480. </li>
  481. </ul>
  482. </div>
  483. </div>
  484. </div>
  485. </div>
  486. <!-- 十强称号logo -->
  487. <HomeTopTen :imgurl="adList[3]" v-if="adList[3]"></HomeTopTen>
  488. <!-- 第五层 -->
  489. <div class="scienceEducation" v-if="pageData[12].cid!=''&&pageData[13].cid!=''">
  490. <div class="inner">
  491. <div class="innerLeft" v-if="pageData[12].cid!=''">
  492. <div class="slider">
  493. <div class="scienceTitle">
  494. <h5>
  495. <NuxtLink :to="{ path: `/newsList/${pageData[12].cid}`}" target="_blank" v-if="pageData[12]">
  496. {{ pageData[12].title }}
  497. </NuxtLink>
  498. </h5>
  499. <p class="title">
  500. <span v-if="pageData[12]" @click="qhtabs(1)">
  501. <b v-if="showTabs == 1" class="active">{{ pageData[12].title1 }}</b>
  502. <b v-else class="noSelect">{{ pageData[12].title1 }}</b>
  503. </span>
  504. <span v-if="pageData[12]" @click="qhtabs(2)">
  505. <b v-if="showTabs == 2" class="active">{{ pageData[12].title2 }}</b>
  506. <b v-else class="noSelect">{{ pageData[12].title2 }}</b>
  507. </span>
  508. <span v-if="pageData[12]" @click="qhtabs(3)">
  509. <b v-if="showTabs == 3" class="active">{{ pageData[12].title3 }}</b>
  510. <b v-else class="noSelect">{{ pageData[12].title3 }}</b>
  511. </span>
  512. <span v-if="pageData[12]" @click="qhtabs(4)">
  513. <b v-if="showTabs == 4" class="active">{{ pageData[12].title4 }}</b>
  514. <b v-else class="noSelect">{{ pageData[12].title4 }}</b>
  515. </span>
  516. </p>
  517. </div>
  518. <div class="box">
  519. <div class="scienceListBox">
  520. <ul class="scienceList" v-if="showTabs == 1">
  521. <li v-for="item in pageData[12].data1">
  522. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1"><img :src="item.imgurl"></NuxtLink>
  523. <NuxtLink
  524. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  525. target="_blank" v-if="item.islink==0"><img :src="item.imgurl"></NuxtLink>
  526. <p>
  527. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  528. <NuxtLink
  529. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  530. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  531. </p>
  532. </li>
  533. </ul>
  534. <ul class="scienceList" v-if="showTabs == 2">
  535. <li v-for="item in pageData[12].data2">
  536. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1"><img :src="item.imgurl"></NuxtLink>
  537. <NuxtLink
  538. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  539. target="_blank" v-if="item.islink==0"><img :src="item.imgurl"></NuxtLink>
  540. <p>
  541. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  542. <NuxtLink
  543. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  544. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  545. </p>
  546. </li>
  547. </ul>
  548. <ul class="scienceList" v-if="showTabs == 3">
  549. <li v-for="item in pageData[12].data3">
  550. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1"><img :src="item.imgurl"></NuxtLink>
  551. <NuxtLink
  552. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  553. target="_blank" v-if="item.islink==0"><img :src="item.imgurl"></NuxtLink>
  554. <p>
  555. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  556. <NuxtLink
  557. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  558. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  559. </p>
  560. </li>
  561. </ul>
  562. <ul class="scienceList" v-if="showTabs == 4">
  563. <li v-for="item in pageData[12].data4">
  564. <img :src="item.imgurl">
  565. <p>
  566. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  567. <NuxtLink
  568. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  569. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  570. </p>
  571. </li>
  572. </ul>
  573. </div>
  574. </div>
  575. </div>
  576. </div>
  577. <div class="innerRight" v-if="pageData[13].cid!=''">
  578. <h3>
  579. <NuxtLink :to="{ path: `/newsList/${pageData[13].cid}`}" target="_blank" v-if="pageData[13]">
  580. {{ pageData[13].title }}
  581. </NuxtLink>
  582. <span>
  583. <NuxtLink
  584. :to="{ path: `/newsList/${pageData[13].cid}`, query: { catid: pageData[13].cid } }"
  585. target="_blank" v-if="pageData[13]">查看更多</NuxtLink>
  586. </span>
  587. </h3>
  588. <ul class="sannongList">
  589. <li v-for="item in pageData[13].data3">
  590. <em></em>
  591. <span>
  592. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">{{ item.title }}</NuxtLink>
  593. <NuxtLink
  594. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  595. target="_blank" v-if="item.islink==0">{{ item.title }}</NuxtLink>
  596. </span>
  597. </li>
  598. </ul>
  599. <div class="banner">
  600. <HomeSmallSwiper :swiperData="pageData[13].data"></HomeSmallSwiper>
  601. </div>
  602. <div class="banner_b_img">
  603. <div class="photo">
  604. <article v-for="(item, index) in pageData[13].data2">
  605. <div class="photoL" v-if="index == 0">
  606. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  607. <img :src="item.imgurl">
  608. <span>{{ item.title }}</span>
  609. </NuxtLink>
  610. <NuxtLink
  611. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  612. target="_blank" v-if="item.islink==0">
  613. <img :src="item.imgurl">
  614. <span>{{ item.title }}</span>
  615. </NuxtLink>
  616. </div>
  617. <div class="photoL" v-if="index == 1">
  618. <NuxtLink :to="item.linkurl" target="_blank" v-if="item.islink==1">
  619. <img :src="item.imgurl">
  620. <span>{{ item.title }}</span>
  621. </NuxtLink>
  622. <NuxtLink
  623. :to="{ path: `/newsDetail/${item.id}`, query: { listId: routeId, listName: routeName } }"
  624. target="_blank" v-if="item.islink==0">
  625. <img :src="item.imgurl">
  626. <span>{{ item.title }}</span>
  627. </NuxtLink>
  628. </div>
  629. </article>
  630. </div>
  631. </div>
  632. </div>
  633. </div>
  634. </div>
  635. <!-- 页脚部分 -->
  636. <HomeFoot1></HomeFoot1>
  637. </div>
  638. </template>
  639. <script setup>
  640. //获取生命周期
  641. import { onMounted } from 'vue';
  642. //获得跳转过来的id
  643. const route = useRoute();
  644. const routeId = route.params.id; //获得该页面的id
  645. const routeName = route.query.name; //获得该页面的名称
  646. //获取行政部门和地区
  647. const cityid = route.query.cityid;
  648. const depId = route.query.department_id;
  649. //获得axios
  650. const nuxtApp = useNuxtApp();
  651. const axios = nuxtApp.$axios;
  652. // 定义响应式数据
  653. const seoData = ref({
  654. title: '三农资讯网',
  655. description: '默认描述',
  656. keywords: '默认关键词',
  657. image: 'https://example.com/default-image.jpg'
  658. });
  659. const hoverStatus = ref(1)
  660. const qhPic = function (num) {
  661. console.log(num)
  662. hoverStatus.value = num;
  663. }
  664. //获得所有广告
  665. const adList = ref("");
  666. const aa='CATEGORY'
  667. const getadList = async () => {
  668. try {
  669. const response = await axios.get(`/web/getWebsiteAdvertisement?ad_tag=${aa}`);
  670. adList.value = response.data;
  671. } catch (error) {
  672. console.error(error);
  673. }
  674. }
  675. onMounted(() => {
  676. getadList()
  677. })
  678. // 在 onMounted 钩子中获取数据
  679. onMounted(async () => {
  680. // try {
  681. // const response = await axios.get(`/web/getWebsiteCategoryHead?catid=${routeId}`);
  682. // const data = response.data.website_head; // 假设接口返回的数据在 data 字段中
  683. // console.log(seoData.value.title)
  684. // // 更新 seoData
  685. // seoData.value = {
  686. // title: data.seo_title,
  687. // description: data.seo_description,
  688. // keywords: data.seo_keywords,
  689. // image: data.seo_image
  690. // };
  691. // console.log(seoData.value.title)
  692. // } catch (error) {
  693. // console.error('获取 SEO 数据失败:', error);
  694. // // 设置默认值
  695. // seoData.value = {
  696. // title: '三农资讯网',
  697. // description: '默认描述',
  698. // keywords: '默认关键词',
  699. // image: 'https://example.com/default-image.jpg'
  700. // };
  701. // }
  702. });
  703. // 监听 seoData 的变化,动态设置 SEO 字段
  704. watch(seoData, (newVal) => {
  705. if (newVal.title) { // 确保 title 有值
  706. useSeoMeta({
  707. title: newVal.title, // 使用动态值
  708. description: newVal.description,
  709. ogTitle: newVal.title,
  710. ogDescription: newVal.description,
  711. ogImage: newVal.image,
  712. twitterTitle: newVal.title,
  713. twitterDescription: newVal.description,
  714. twitterImage: newVal.image,
  715. keywords: newVal.keywords
  716. });
  717. }
  718. }, { immediate: true });
  719. //该页面上所有的导航池 转为动态数据
  720. const pageCategory = ref([]);
  721. //该页面上需要渲染的所有数据
  722. const pageData = ref([
  723. { id: 0, data: [], data2: [], title: "", cid: "" },
  724. { id: 1, data: [], title: "", cid: "" },
  725. { id: 2, data: [], title: "", cid: "" },
  726. { id: 3, data: [], title: "", cid: "" },
  727. { id: 4, data: [], title: "", cid: "" },
  728. { id: 5, data: [], title: "", cid: "" },
  729. { id: 6, data: [], title: "", cid: "" },
  730. { id: 7, data: [], title: "", cid: "" },
  731. { id: 8, data: [], title: "", cid: "" },
  732. { id: 9, data: [], title: "", cid: "" },
  733. { id: 10, data: [], title: "", cid: "" },
  734. { id: 10, data: [], title: "", cid: "" },
  735. {
  736. id: 11,
  737. title: "",
  738. data: [],
  739. data1: [],
  740. data2: [],
  741. data3: [],
  742. data4: [],
  743. category_id1: "",
  744. category_id2: "",
  745. category_id3: "",
  746. category_id4: "",
  747. title1: "",
  748. title2: "",
  749. title3: "",
  750. title4: "",
  751. cid: ""
  752. },
  753. { id: 12, data1: [], data2: [], data3: [], cid: "" },
  754. ])
  755. //第一种情况 直接获得二级导航
  756. //第一步:获得该分类下的所有二级导航
  757. const newCategory = useState("getWebsiteModelCategory", () => ''); //动态数据
  758. //placeid 固定为1
  759. //pid 由上个页面带过来的1级导航id
  760. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  761. const getWebsiteModelCategory = async () => {
  762. try {
  763. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${routeId}&num=${14}`);
  764. pageCategory.value = response.data;
  765. //给与板块标题
  766. for (let index in response.data) {
  767. pageData.value[index].title = response.data[index].name
  768. pageData.value[index].cid = response.data[index].category_id
  769. }
  770. console.log(pageData.value)
  771. console.log('pageCategory111111111111111', pageCategory.value)
  772. renderPage();
  773. } catch (error) {
  774. console.error(error);
  775. }
  776. }
  777. //第二种情况 用户搜索的二级导航
  778. const searchCategory = useState("selectWebsiteCategory", () => ''); //动态数据
  779. //placeid 固定为1
  780. //pid 由上个页面带过来的1级导航id
  781. //num 获得多少个2级导航 取决你的页面显示 上面有几个你就请求几个
  782. const selectWebsiteCategory = async () => {
  783. try {
  784. const response = await axios.get(`/web/selectWebsiteCategory?pid=${routeId}&cityid=${cityid}&department_id=${depId}`);
  785. pageCategory.value = response.data;
  786. //给与板块标题
  787. for (let index in response.data) {
  788. pageData.value[index].title = response.data[index].name
  789. }
  790. console.log(pageData.value)
  791. console.log(pageCategory.value)
  792. renderPage2();
  793. } catch (error) {
  794. console.error(error);
  795. }
  796. }
  797. //第二步:获得对应分类下的数据
  798. const renderPage = function () {
  799. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  800. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  801. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  802. getWebsiteArticlesList(pageCategory.value[i].category_id, i)
  803. }
  804. }
  805. //第二步:获得搜索对应分类下的数据 - 因为字段名字不一样,这里做了一下区分
  806. const renderPage2 = function () {
  807. console.log("当前获取到:" + pageCategory.value.length + "个导航")
  808. //循环pageCategory.value.length的次数执行getWebsiteArticlesList
  809. for (let i = 0; i <= pageCategory.value.length - 1; i++) {
  810. getWebsiteArticlesList(pageCategory.value[i].id, i)
  811. }
  812. }
  813. //第三步循环获取数据
  814. const getWebsiteArticlesList = async (name, listType) => {
  815. //第一层
  816. //板块1 图文
  817. if (listType == 0) {
  818. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${8}`);
  819. pageData.value[0].data = response.data
  820. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}&placeid=${9}`);
  821. pageData.value[0].data2 = response2.data
  822. }
  823. //板块2 图文
  824. if (listType == 1) {
  825. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  826. pageData.value[1].data = response.data;
  827. }
  828. //第二层
  829. //板块3 图文
  830. if (listType == 2) {
  831. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  832. pageData.value[2].data = response.data;
  833. }
  834. //板块4 图文
  835. if (listType == 3) {
  836. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  837. pageData.value[3].data = response.data;
  838. }
  839. //板块5 图文
  840. if (listType == 4) {
  841. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${6}`);
  842. pageData.value[4].data = response.data;
  843. }
  844. //第三层
  845. //板块6 图文
  846. if (listType == 5) {
  847. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  848. pageData.value[5].data = response.data;
  849. }
  850. //板块7 图文
  851. if (listType == 6) {
  852. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  853. pageData.value[6].data = response.data;
  854. }
  855. //板块8 图文
  856. if (listType == 7) {
  857. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${5}`);
  858. pageData.value[7].data = response.data;
  859. }
  860. //板块9 图文
  861. if (listType == 8) {
  862. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${4}`);
  863. pageData.value[8].data = response.data;
  864. }
  865. //第四层
  866. //板块10 文字
  867. if (listType == 9) {
  868. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  869. pageData.value[9].data = response.data;
  870. }
  871. //板块11 文字
  872. if (listType == 10) {
  873. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${10}`);
  874. pageData.value[10].data = response.data;
  875. }
  876. //板块12 轮播图 图文 文字
  877. if (listType == 11) {
  878. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  879. pageData.value[11].data = response.data;
  880. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  881. pageData.value[11].data2 = response2.data;
  882. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  883. pageData.value[11].data3 = response3.data;
  884. }
  885. //第五层
  886. //板块12 多级栏目 判断下面有没有子级 如果有每个取出来 6条图文
  887. if (listType == 12) {
  888. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${10}`);
  889. pageData.value[12].data = response.data;
  890. console.log("第一步获取父级id")
  891. console.log(pageCategory.value[12].children_count)
  892. console.log(pageCategory.value[12].category_id)
  893. //判断一下里面有没有子导航
  894. if (pageCategory.value[12].children_count != 0) {
  895. //开始请求子导航
  896. const response = await axios.get(`/web/getWebsiteModelCategory?placeid=${1}&pid=${pageCategory.value[12].category_id}&num=${100}`);
  897. console.log("第二步获取子级数量")
  898. console.log(response.data.length)
  899. //获得标题
  900. //判断里面有几个
  901. for (let i = 1; i <= response.data.length; i++) {
  902. if (i == 1) {
  903. pageData.value[12].title1 = response.data[0].name
  904. pageData.value[12].category_id1 = response.data[0].category_id
  905. }
  906. if (i == 2) {
  907. pageData.value[12].title2 = response.data[1].name
  908. pageData.value[12].category_id2 = response.data[1].category_id
  909. }
  910. if (i == 3) {
  911. pageData.value[12].title3 = response.data[2].name
  912. pageData.value[12].category_id3 = response.data[2].category_id
  913. }
  914. if (i == 4) {
  915. pageData.value[12].title4 = response.data[3].name
  916. pageData.value[12].category_id4 = response.data[3].category_id
  917. }
  918. }
  919. //获得内容
  920. //第三步:有几个就循环几次
  921. for (let i = 1; i <= pageCategory.value[12].children_count; i++) {
  922. if (i == 1) {
  923. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id1}&level=${3}&pagesize=${6}`);
  924. pageData.value[12].data1 = response.data
  925. }
  926. if (i == 2) {
  927. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id2}&level=${3}&pagesize=${6}`);
  928. pageData.value[12].data2 = response.data
  929. }
  930. if (i == 3) {
  931. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id3}&level=${3}&pagesize=${6}`);
  932. pageData.value[12].data3 = response.data
  933. }
  934. if (i == 4) {
  935. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${pageData.value[12].category_id4}&level=${3}&pagesize=${6}`);
  936. pageData.value[12].data4 = response.data
  937. }
  938. }
  939. }
  940. }
  941. //板块13 轮播图 图文 文字
  942. if (listType == 13) {
  943. const response = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${2}&pagesize=${4}`);
  944. pageData.value[13].data = response.data;
  945. const response2 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${3}&pagesize=${2}`);
  946. pageData.value[13].data2 = response2.data;
  947. const response3 = await axios.get(`/web/getWebsiteModelArticles?catid=${name}&level=${1}&pagesize=${5}`);
  948. pageData.value[13].data3 = response3.data;
  949. }
  950. }
  951. let scienceTitleList = [
  952. {
  953. id: 1,
  954. title: "农产畅销"
  955. },
  956. {
  957. id: 2,
  958. title: "农业在线"
  959. },
  960. {
  961. id: 3,
  962. title: "农产行情"
  963. },
  964. {
  965. id: 4,
  966. title: "名优特产"
  967. }
  968. ]
  969. //鼠标移入标题时,下方内容会发生变化
  970. let changeUl = (index) => {
  971. // console.log(index);
  972. if (process.browser) {
  973. let scienceListBox = document.querySelector('.scienceListBox');
  974. let titleList = document.querySelectorAll('.title>span>a')
  975. for (let i = 0; i < titleList.length; i++) {
  976. titleList[i].className = ''
  977. }
  978. titleList[index].setAttribute('class', 'current')
  979. if (index == 0) {
  980. scienceListBox.style.left = 0
  981. } else if (index == 1) {
  982. scienceListBox.style.left = "-790px"
  983. } else if (index == 2) {
  984. scienceListBox.style.left = "-1580px"
  985. } else if (index == 3) {
  986. scienceListBox.style.left = "-2370px"
  987. }
  988. }
  989. }
  990. //显示哪个tabs
  991. let showTabs = ref(1)
  992. let qhtabs = function (number) {
  993. console.log(number)
  994. showTabs.value = number
  995. }
  996. //挂载成功钩子函数
  997. onMounted(() => {
  998. //判断一下应该走搜索还是直接走二级分类
  999. console.log(111111)
  1000. console.log(cityid)
  1001. console.log(cityid != undefined)
  1002. console.log(depId != undefined)
  1003. if (cityid != undefined || depId != undefined) {
  1004. console.log(7777777777)
  1005. console.log(cityid)
  1006. console.log(depId)
  1007. //获得用户搜索的导航
  1008. selectWebsiteCategory()
  1009. } else {
  1010. console.log(888888888)
  1011. //直接获得所有二级导航
  1012. getWebsiteModelCategory()
  1013. }
  1014. })
  1015. function getDays(time) {
  1016. const date = new Date(time);
  1017. const year = date.getFullYear();
  1018. const month = date.getMonth() + 1;
  1019. const day = date.getDate();
  1020. return `${month}-${day}`;
  1021. }
  1022. </script>
  1023. <style lang="less" scoped>
  1024. a {
  1025. color: #333333;
  1026. }
  1027. //农民工part1
  1028. .farmingPartOne {
  1029. width: 100%;
  1030. height: 600px;
  1031. .inner {
  1032. height: 600px;
  1033. .innerLeft {
  1034. height: 600px;
  1035. .leftTop {
  1036. margin-top: 20px;
  1037. height: 320px;
  1038. .leftTopPhoto {
  1039. width: 387px;
  1040. height: 320px;
  1041. position: relative;
  1042. img {
  1043. width: 387px;
  1044. height: 320px;
  1045. }
  1046. span {
  1047. display: inline-block;
  1048. width: 387px;
  1049. height: 50px;
  1050. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  1051. color: #FFFFFF;
  1052. position: absolute;
  1053. bottom: 0;
  1054. left: 0;
  1055. font-family: Source Han Sans, Source Han Sans;
  1056. font-weight: 500;
  1057. font-size: 20px;
  1058. line-height: 23px;
  1059. padding-top: 11px;
  1060. padding-left: 13px;
  1061. box-sizing: border-box;
  1062. white-space: nowrap;
  1063. /* 禁止换行 */
  1064. overflow: hidden;
  1065. /* 隐藏超出部分 */
  1066. text-overflow: ellipsis;
  1067. /* 超出部分显示省略号 */
  1068. }
  1069. }
  1070. >ul.left {
  1071. margin-left: 25px;
  1072. width: 362px;
  1073. height: 320px;
  1074. margin-top: 5px;
  1075. >li {
  1076. em {
  1077. display: inline-block;
  1078. width: 8px;
  1079. height: 8px;
  1080. border-radius: 8px;
  1081. background-color: #d9d9d9;
  1082. margin-right: 8px;
  1083. vertical-align: middle;
  1084. }
  1085. width: 362px;
  1086. height: 22px;
  1087. font-family: PingFang SC,
  1088. PingFang SC;
  1089. font-weight: 500;
  1090. font-size: 18px;
  1091. color: #333333;
  1092. line-height: 22px;
  1093. text-align: left;
  1094. font-style: normal;
  1095. text-transform: none;
  1096. margin-bottom: 19px;
  1097. white-space: nowrap;
  1098. /* 禁止换行 */
  1099. overflow: hidden;
  1100. /* 隐藏超出部分 */
  1101. text-overflow: ellipsis;
  1102. /* 超出部分显示省略号 */
  1103. }
  1104. >li:hover {
  1105. a {
  1106. color: #088f04;
  1107. }
  1108. color: #088f04;
  1109. }
  1110. >li:hover>em {
  1111. background-color: #088f04;
  1112. }
  1113. }
  1114. }
  1115. .leftBottom {
  1116. height: 202px;
  1117. margin-top: 21px;
  1118. >li {
  1119. float: left;
  1120. width: 185px;
  1121. height: 202px;
  1122. margin-right: 10px;
  1123. >a {
  1124. >img {
  1125. width: 185px;
  1126. height: 139px;
  1127. }
  1128. }
  1129. >p {
  1130. width: 185px;
  1131. height: 58px;
  1132. padding: 8px 5px 12px;
  1133. box-sizing: border-box;
  1134. background-color: #f5f5f5;
  1135. font-family: PingFang SC, PingFang SC;
  1136. font-weight: 500;
  1137. font-size: 18px;
  1138. color: #333333;
  1139. line-height: 24px;
  1140. text-align: left;
  1141. font-style: normal;
  1142. text-transform: none;
  1143. display: -webkit-box;
  1144. -webkit-box-orient: vertical;
  1145. -webkit-line-clamp: 2;
  1146. /* 限制显示的行数 */
  1147. overflow: hidden;
  1148. text-overflow: ellipsis;
  1149. }
  1150. }
  1151. >li:hover {
  1152. a {
  1153. color: #088f04;
  1154. }
  1155. }
  1156. >li:last-child {
  1157. margin: 0;
  1158. }
  1159. }
  1160. }
  1161. .innerRight {
  1162. .rightList {
  1163. height: 540px;
  1164. margin-top: 20px;
  1165. >li {
  1166. height: 100px;
  1167. margin-bottom: 10px;
  1168. img {
  1169. width: 150px;
  1170. height: 100px;
  1171. }
  1172. >p {
  1173. width: 219px;
  1174. height: 100px;
  1175. display: -webkit-box;
  1176. -webkit-box-orient: vertical;
  1177. -webkit-line-clamp: 4;
  1178. overflow: hidden;
  1179. text-overflow: ellipsis;
  1180. word-break: break-all;
  1181. padding-left: 12px;
  1182. font-family: PingFang SC, PingFang SC;
  1183. font-weight: 400;
  1184. font-size: 16px;
  1185. color: #333333;
  1186. line-height: 24px;
  1187. text-align: left;
  1188. font-style: normal;
  1189. text-transform: none;
  1190. }
  1191. >p:hover {
  1192. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  1193. a {
  1194. color: #088f04;
  1195. }
  1196. }
  1197. }
  1198. }
  1199. }
  1200. }
  1201. }
  1202. //农民工part2
  1203. .farmingPartTwo {
  1204. width: 100%;
  1205. height: 600px;
  1206. .inner {
  1207. width: 1200px;
  1208. height: 600px;
  1209. >.farmer {
  1210. float: left;
  1211. width: 380px;
  1212. height: 600px;
  1213. margin-right: 29px;
  1214. // 农民工part2标题
  1215. >.title {
  1216. width: 380px;
  1217. }
  1218. >.title>h3 {
  1219. height: 36px;
  1220. font-family: Source Han Sans, Source Han Sans;
  1221. font-weight: bold;
  1222. font-size: 24px;
  1223. color: #000000;
  1224. line-height: 28px;
  1225. text-align: left;
  1226. font-style: normal;
  1227. text-transform: none;
  1228. border-bottom: 1px solid #139602;
  1229. }
  1230. >.title>h3>span>a {
  1231. float: right;
  1232. width: 56px;
  1233. height: 20px;
  1234. line-height: 24px;
  1235. font-weight: 400;
  1236. font-size: 14px;
  1237. color: #999999;
  1238. font-style: normal;
  1239. text-transform: none;
  1240. }
  1241. // 农民工part2图片
  1242. .PartTwoPhoto {
  1243. width: 380px;
  1244. height: 280px;
  1245. margin-top: 20px;
  1246. position: relative;
  1247. img {
  1248. width: 380px;
  1249. height: 280px;
  1250. }
  1251. span {
  1252. display: inline-block;
  1253. width: 380px;
  1254. height: 50px;
  1255. background: linear-gradient(to bottom, rgba(0, 0, 0, 0), rgba(0, 0, 0, 1));
  1256. color: #FFFFFF;
  1257. position: absolute;
  1258. bottom: 0;
  1259. left: 0;
  1260. font-family: Source Han Sans, Source Han Sans;
  1261. font-weight: 500;
  1262. font-size: 20px;
  1263. line-height: 23px;
  1264. padding-top: 11px;
  1265. padding-left: 13px;
  1266. box-sizing: border-box;
  1267. white-space: nowrap;
  1268. /* 禁止换行 */
  1269. overflow: hidden;
  1270. /* 隐藏超出部分 */
  1271. text-overflow: ellipsis;
  1272. /* 超出部分显示省略号 */
  1273. }
  1274. }
  1275. //农民工part2文字列表
  1276. .PartTwoList {
  1277. width: 380px;
  1278. height: 263px;
  1279. background-color: #fff;
  1280. box-shadow: 0px 4px 30px 1px rgba(174, 174, 174, 0.25);
  1281. padding-top: 20px;
  1282. box-sizing: border-box;
  1283. >li {
  1284. width: 380px;
  1285. height: 25px;
  1286. line-height: 25px;
  1287. font-family: PingFang SC, PingFang SC;
  1288. font-weight: 500;
  1289. font-size: 18px;
  1290. color: #333333;
  1291. margin-bottom: 16px;
  1292. white-space: nowrap;
  1293. /* 禁止换行 */
  1294. overflow: hidden;
  1295. /* 隐藏超出部分 */
  1296. text-overflow: ellipsis;
  1297. /* 超出部分显示省略号 */
  1298. >em {
  1299. display: inline-block;
  1300. width: 8px;
  1301. height: 8px;
  1302. background-color: #d9d9d9;
  1303. border-radius: 8px;
  1304. margin-left: 19px;
  1305. margin-right: 10px;
  1306. }
  1307. }
  1308. >li:hover {
  1309. color: #139602;
  1310. a {
  1311. color: #088f04;
  1312. }
  1313. }
  1314. >li:hover>em {
  1315. background-color: #139602;
  1316. }
  1317. }
  1318. }
  1319. >.farmer:last-child {
  1320. margin-right: 0;
  1321. }
  1322. }
  1323. }
  1324. //资讯推荐
  1325. .zixuntuijian {
  1326. width: 100%;
  1327. height: 600px;
  1328. .innerLeft {
  1329. // 左侧的上半部分
  1330. .zixunTop {
  1331. height: 286px;
  1332. .zixunLeft,
  1333. .zixunRight {
  1334. float: left;
  1335. width: 380px;
  1336. height: 286px;
  1337. .towPic {
  1338. display: flex;
  1339. width: 380px;
  1340. height: 116px;
  1341. margin-top: 20px;
  1342. .picBox {
  1343. width: 50%;
  1344. text-align: center;
  1345. }
  1346. .picBox:nth-child(3),
  1347. .picBox:nth-child(4),
  1348. .picBox:nth-child(5) {
  1349. display: none;
  1350. }
  1351. img {
  1352. width: 190px;
  1353. height: 120px;
  1354. }
  1355. .picBox:first-child {
  1356. margin-right: 5px;
  1357. }
  1358. }
  1359. // 标题部分
  1360. >.title {
  1361. width: 380px;
  1362. }
  1363. >.title>h3 {
  1364. height: 36px;
  1365. font-family: Source Han Sans, Source Han Sans;
  1366. font-weight: bold;
  1367. font-size: 24px;
  1368. color: #000000;
  1369. line-height: 28px;
  1370. text-align: left;
  1371. font-style: normal;
  1372. text-transform: none;
  1373. border-bottom: 1px solid #139602;
  1374. }
  1375. >.title>h3>span {
  1376. float: right;
  1377. width: 56px;
  1378. height: 20px;
  1379. line-height: 24px;
  1380. font-weight: 400;
  1381. font-size: 14px;
  1382. color: #999999;
  1383. font-style: normal;
  1384. text-transform: none;
  1385. }
  1386. .photo_text {
  1387. article {
  1388. white-space: nowrap;
  1389. /* 禁止换行 */
  1390. overflow: hidden;
  1391. /* 隐藏超出部分 */
  1392. text-overflow: ellipsis;
  1393. /* 超出部分显示省略号 */
  1394. li {
  1395. white-space: nowrap;
  1396. /* 禁止换行 */
  1397. overflow: hidden;
  1398. /* 隐藏超出部分 */
  1399. text-overflow: ellipsis;
  1400. /* 超出部分显示省略号 */
  1401. a:hover {
  1402. color: #088f04;
  1403. }
  1404. }
  1405. li:hover {
  1406. color: #088f04;
  1407. a {
  1408. color: #088f04;
  1409. }
  1410. }
  1411. img {
  1412. width: 100px;
  1413. }
  1414. }
  1415. li {
  1416. width: 380px;
  1417. height: 25px;
  1418. font-family: PingFang SC, PingFang SC;
  1419. font-weight: 500;
  1420. font-size: 18px;
  1421. color: #333333;
  1422. line-height: 21px;
  1423. text-align: left;
  1424. font-style: normal;
  1425. text-transform: none;
  1426. margin-bottom: 9px;
  1427. em {
  1428. display: inline-block;
  1429. width: 8px;
  1430. height: 8px;
  1431. border-radius: 8px;
  1432. margin-right: 10px;
  1433. background-color: #d9d9d9;
  1434. }
  1435. }
  1436. }
  1437. }
  1438. // 左侧的资讯推荐的左半部分
  1439. .zixunLeft {
  1440. margin-right: 30px;
  1441. .photo_text {
  1442. li:first-child {
  1443. width: 380px;
  1444. height: 120px;
  1445. margin-top: 20px;
  1446. margin-bottom: 16px;
  1447. position: relative;
  1448. img {
  1449. float: left;
  1450. width: 160px;
  1451. height: 120px;
  1452. }
  1453. div {
  1454. float: left;
  1455. width: 220px;
  1456. height: 120px;
  1457. padding-left: 15px;
  1458. padding-top: 6px;
  1459. box-sizing: border-box;
  1460. background-color: #f6f6f6;
  1461. h5 {
  1462. width: 200px;
  1463. height: 54px;
  1464. white-space: nowrap;
  1465. overflow: hidden;
  1466. text-overflow: ellipsis;
  1467. font-family: Source Han Sans, Source Han Sans;
  1468. font-weight: 500;
  1469. font-size: 18px;
  1470. color: #333333;
  1471. line-height: 26px;
  1472. text-align: left;
  1473. font-style: normal;
  1474. text-transform: none;
  1475. }
  1476. p {
  1477. width: 200px;
  1478. height: 22px;
  1479. line-height: 20px;
  1480. position: absolute;
  1481. bottom: 5px;
  1482. right: 0;
  1483. span {
  1484. display: inline-block;
  1485. width: 75px;
  1486. height: 18px;
  1487. font-family: Source Han Sans, Source Han Sans;
  1488. font-weight: 400;
  1489. font-size: 12px;
  1490. color: #999999;
  1491. text-align: left;
  1492. line-height: 14px;
  1493. font-style: normal;
  1494. text-transform: none;
  1495. }
  1496. span:last-child {
  1497. width: 90px;
  1498. text-align: right;
  1499. }
  1500. }
  1501. }
  1502. }
  1503. >li {
  1504. width: 380px;
  1505. height: 25px;
  1506. font-family: PingFang SC, PingFang SC;
  1507. font-weight: 500;
  1508. font-size: 18px;
  1509. color: #333333;
  1510. line-height: 21px;
  1511. text-align: left;
  1512. font-style: normal;
  1513. text-transform: none;
  1514. margin-bottom: 9px;
  1515. em {
  1516. display: inline-block;
  1517. width: 8px;
  1518. height: 8px;
  1519. border-radius: 8px;
  1520. margin-right: 10px;
  1521. background-color: #d9d9d9;
  1522. }
  1523. }
  1524. }
  1525. }
  1526. // 左侧的资讯推荐的右半部分
  1527. .zixunRight {
  1528. width: 380px;
  1529. height: 229px;
  1530. .photo_text {
  1531. margin-top: 20px;
  1532. >li:nth-child(1) {
  1533. display: none;
  1534. }
  1535. >li:nth-child(2) {
  1536. display: none;
  1537. }
  1538. }
  1539. }
  1540. }
  1541. //左侧的下半部分
  1542. .zixunBottom {
  1543. width: 790px;
  1544. height: 280px;
  1545. margin-top: 40px;
  1546. img {
  1547. width: 498px;
  1548. height: 280px;
  1549. }
  1550. >.leftList {
  1551. width: 290px;
  1552. height: 280px;
  1553. background-color: #f6f6f6;
  1554. padding: 11px 26px 6px 20px;
  1555. box-sizing: border-box;
  1556. >li {
  1557. width: 296px;
  1558. height: 35px;
  1559. line-height: 35px;
  1560. color: #666666;
  1561. font-size: 14px;
  1562. margin-bottom: 18px;
  1563. h4 {
  1564. font-family: Source Han Sans, Source Han Sans;
  1565. height: 35px;
  1566. line-height: 35px;
  1567. font-size: 18px;
  1568. font-weight: 400;
  1569. white-space: nowrap;
  1570. /* 禁止换行 */
  1571. overflow: hidden;
  1572. /* 隐藏超出部分 */
  1573. text-overflow: ellipsis;
  1574. /* 超出部分显示省略号 */
  1575. color: #333333;
  1576. width: 260px;
  1577. em {
  1578. display: inline-block;
  1579. width: 8px;
  1580. height: 8px;
  1581. background-color: #333333;
  1582. border-radius: 8px;
  1583. margin-right: 5px;
  1584. }
  1585. }
  1586. p {
  1587. width: 249px;
  1588. height: 48px;
  1589. line-height: 24px;
  1590. padding-left: 14px;
  1591. display: -webkit-box;
  1592. -webkit-box-orient: vertical;
  1593. -webkit-line-clamp: 2;
  1594. /* 限制显示的行数 */
  1595. overflow: hidden;
  1596. text-overflow: ellipsis;
  1597. }
  1598. }
  1599. >li:hover,
  1600. >li:hover>h4>a,
  1601. >li:hover>p>a {
  1602. color: #088f04;
  1603. }
  1604. >li:hover>h4>em {
  1605. background-color: #088f04;
  1606. }
  1607. }
  1608. }
  1609. }
  1610. .innerRight {
  1611. .information {
  1612. width: 380px;
  1613. margin-top: 20px;
  1614. >li {
  1615. width: 380px;
  1616. height: 120px;
  1617. margin-bottom: 21px;
  1618. img {
  1619. float: left;
  1620. width: 160px;
  1621. height: 120px;
  1622. }
  1623. .text {
  1624. float: left;
  1625. width: 220px;
  1626. height: 120px;
  1627. padding-left: 15px;
  1628. box-sizing: border-box;
  1629. >h5 {
  1630. width: 199px;
  1631. height: 49px;
  1632. display: -webkit-box;
  1633. -webkit-box-orient: vertical;
  1634. -webkit-line-clamp: 2;
  1635. overflow: hidden;
  1636. padding-top: 6px;
  1637. font-family: PingFang SC, PingFang SC;
  1638. font-weight: 600;
  1639. font-size: 18px;
  1640. color: #333333;
  1641. line-height: 26px;
  1642. text-align: left;
  1643. font-style: normal;
  1644. text-transform: none;
  1645. }
  1646. >p {
  1647. width: 198px;
  1648. height: 20px;
  1649. display: -webkit-box;
  1650. -webkit-box-orient: vertical;
  1651. -webkit-line-clamp: 2;
  1652. overflow: hidden;
  1653. text-overflow: ellipsis;
  1654. word-break: break-all;
  1655. margin-top: 16px;
  1656. font-family: PingFang SC, PingFang SC;
  1657. font-weight: 400;
  1658. font-size: 14px;
  1659. color: #666666;
  1660. line-height: 24px;
  1661. text-align: left;
  1662. font-style: normal;
  1663. text-transform: none;
  1664. margin-top: 40px;
  1665. }
  1666. }
  1667. .text:hover {
  1668. box-shadow: 0 0 16px 1px rgba(0, 0, 0, 0.1);
  1669. background-color: #fff;
  1670. h5 {
  1671. a {
  1672. color: #088f04;
  1673. }
  1674. }
  1675. p {
  1676. color: #088f04;
  1677. }
  1678. }
  1679. }
  1680. }
  1681. }
  1682. }
  1683. // 农民工
  1684. .farming {
  1685. width: 100%;
  1686. height: 605px;
  1687. // 左侧
  1688. .innerLeft {
  1689. width: 790px;
  1690. height: 605px;
  1691. margin-right: 21px;
  1692. // background-color: #ccc;
  1693. .farmer {
  1694. width: 790px;
  1695. height: 312px;
  1696. >h3 {
  1697. height: 36px;
  1698. font-family: Source Han Sans, Source Han Sans;
  1699. font-weight: bold;
  1700. font-size: 24px;
  1701. color: #000000;
  1702. line-height: 28px;
  1703. text-align: left;
  1704. font-style: normal;
  1705. text-transform: none;
  1706. border-bottom: 1px solid #139602;
  1707. >span {
  1708. float: right;
  1709. width: 56px;
  1710. height: 20px;
  1711. line-height: 24px;
  1712. font-weight: 400;
  1713. font-size: 14px;
  1714. color: #999999;
  1715. font-style: normal;
  1716. text-transform: none;
  1717. }
  1718. }
  1719. >ul {
  1720. margin-top: 20px;
  1721. >li {
  1722. float: left;
  1723. width: 362px;
  1724. height: 22px;
  1725. font-weight: 500;
  1726. font-size: 18px;
  1727. color: #333333;
  1728. line-height: 21px;
  1729. text-align: left;
  1730. margin-bottom: 29px;
  1731. margin-right: 27px;
  1732. white-space: nowrap;
  1733. /* 禁止换行 */
  1734. overflow: hidden;
  1735. /* 隐藏超出部分 */
  1736. text-overflow: ellipsis;
  1737. /* 超出部分显示省略号 */
  1738. >em {
  1739. display: inline-block;
  1740. width: 8px;
  1741. height: 8px;
  1742. background-color: #d9d9d9;
  1743. border-radius: 4px;
  1744. margin: 5px 8px 6px;
  1745. vertical-align: middle;
  1746. }
  1747. }
  1748. >li:hover {
  1749. color: #139602;
  1750. a {
  1751. color: #139602;
  1752. }
  1753. }
  1754. }
  1755. }
  1756. .farmerbottom {
  1757. width: 790px;
  1758. height: 280px;
  1759. img {
  1760. width: 498px;
  1761. height: 280px;
  1762. }
  1763. >.leftList {
  1764. width: 290px;
  1765. height: 280px;
  1766. background-color: #f6f6f6;
  1767. padding: 11px 26px 6px 20px;
  1768. box-sizing: border-box;
  1769. >li {
  1770. width: 296px;
  1771. height: 75px;
  1772. color: #666666;
  1773. font-size: 14px;
  1774. margin-bottom: 18px;
  1775. h4 {
  1776. font-family: Source Han Sans, Source Han Sans;
  1777. height: 27px;
  1778. line-height: 21px;
  1779. font-size: 18px;
  1780. color: #333333;
  1781. em {
  1782. display: inline-block;
  1783. width: 8px;
  1784. height: 8px;
  1785. background-color: #333333;
  1786. border-radius: 8px;
  1787. }
  1788. }
  1789. p {
  1790. width: 249px;
  1791. height: 48px;
  1792. line-height: 24px;
  1793. padding-left: 14px;
  1794. }
  1795. }
  1796. >li:hover,
  1797. >li:hover>h4 {
  1798. color: #088f04;
  1799. }
  1800. >li:hover>h4>em {
  1801. background-color: #088f04;
  1802. }
  1803. }
  1804. }
  1805. }
  1806. // 右侧
  1807. .innerRight {
  1808. width: 380px;
  1809. height: 605px;
  1810. // 标题部分
  1811. >h3 {
  1812. height: 36px;
  1813. font-family: Source Han Sans, Source Han Sans;
  1814. font-weight: bold;
  1815. font-size: 24px;
  1816. color: #000000;
  1817. line-height: 28px;
  1818. text-align: left;
  1819. font-style: normal;
  1820. text-transform: none;
  1821. border-bottom: 1px solid #139602;
  1822. >span {
  1823. float: right;
  1824. width: 56px;
  1825. height: 20px;
  1826. line-height: 24px;
  1827. font-weight: 400;
  1828. font-size: 14px;
  1829. color: #999999;
  1830. font-style: normal;
  1831. text-transform: none;
  1832. }
  1833. }
  1834. // 轮播图
  1835. .banner {
  1836. width: 380px;
  1837. height: 214px;
  1838. margin-top: 20px;
  1839. }
  1840. .banner_b_img {
  1841. // 图片部分
  1842. .photo {
  1843. height: 104px;
  1844. margin-top: 10px;
  1845. display: flex;
  1846. }
  1847. .photoL,
  1848. .photoR {
  1849. float: left;
  1850. width: 185px;
  1851. height: 104px;
  1852. position: relative;
  1853. img {
  1854. width: 185px;
  1855. height: 104px;
  1856. }
  1857. span {
  1858. position: absolute;
  1859. top: 0;
  1860. left: 0;
  1861. display: inline-block;
  1862. padding-left: 7px;
  1863. box-sizing: border-box;
  1864. width: 185px;
  1865. height: 22px;
  1866. background-color: rgba(0, 0, 0, 0.5);
  1867. font-weight: 500px;
  1868. font-size: 14px;
  1869. color: #FFFFFF;
  1870. line-height: 22px;
  1871. white-space: nowrap;
  1872. /* 禁止换行 */
  1873. overflow: hidden;
  1874. /* 隐藏超出部分 */
  1875. text-overflow: ellipsis;
  1876. /* 超出部分显示省略号 */
  1877. }
  1878. }
  1879. .photoL {
  1880. margin-right: 10px;
  1881. }
  1882. }
  1883. .banner_text_list {
  1884. ul {
  1885. width: 380px;
  1886. height: 186px;
  1887. margin-top: 30px;
  1888. >li {
  1889. a {
  1890. height: 22px;
  1891. font-size: 16px;
  1892. &:hover {
  1893. color: #139609;
  1894. }
  1895. }
  1896. height: 22px;
  1897. padding-bottom: 16px;
  1898. white-space: nowrap;
  1899. /* 禁止换行 */
  1900. overflow: hidden;
  1901. /* 隐藏超出部分 */
  1902. text-overflow: ellipsis;
  1903. /* 超出部分显示省略号 */
  1904. >strong {
  1905. display: inline-block;
  1906. width: 24px;
  1907. height: 24px;
  1908. line-height: 24px;
  1909. background-color: #cecece;
  1910. padding-left: 6px;
  1911. box-sizing: border-box;
  1912. font-family: Source Han Sans, Source Han Sans;
  1913. font-weight: 500;
  1914. font-size: 18px;
  1915. color: #FFFFFF;
  1916. font-style: normal;
  1917. text-transform: none;
  1918. }
  1919. >em {
  1920. display: inline-block;
  1921. width: 6px;
  1922. height: 6px;
  1923. border-radius: 10px;
  1924. border: 2px solid #8CBA86;
  1925. margin-right: 10px;
  1926. }
  1927. >span {
  1928. width: 380px;
  1929. height: 22px;
  1930. font-family: PingFang SC, PingFang SC;
  1931. font-weight: 500;
  1932. font-size: 18px;
  1933. color: #333333;
  1934. line-height: 21px;
  1935. text-align: left;
  1936. font-style: normal;
  1937. text-transform: none;
  1938. }
  1939. >span:hover {
  1940. color: #139609;
  1941. }
  1942. }
  1943. }
  1944. }
  1945. }
  1946. }
  1947. //三农科教
  1948. .scienceEducation {
  1949. height: 600px;
  1950. margin-bottom: 76px;
  1951. .innerLeft,
  1952. .innerRight {
  1953. float: left;
  1954. }
  1955. // 左侧
  1956. .innerLeft {
  1957. width: 790px;
  1958. height: 616px;
  1959. margin-right: 21px;
  1960. }
  1961. // 右侧
  1962. .innerRight {
  1963. width: 380px;
  1964. height: 600px;
  1965. // 标题部分
  1966. >h3 {
  1967. height: 36px;
  1968. font-family: Source Han Sans, Source Han Sans;
  1969. font-weight: bold;
  1970. font-size: 24px;
  1971. color: #000000;
  1972. line-height: 28px;
  1973. text-align: left;
  1974. font-style: normal;
  1975. text-transform: none;
  1976. border-bottom: 1px solid #139602;
  1977. >span {
  1978. float: right;
  1979. width: 56px;
  1980. height: 20px;
  1981. line-height: 24px;
  1982. font-weight: 400;
  1983. font-size: 14px;
  1984. color: #999999;
  1985. font-style: normal;
  1986. text-transform: none;
  1987. }
  1988. }
  1989. ul.sannongList {
  1990. width: 380px;
  1991. height: 186px;
  1992. >li {
  1993. height: 22px;
  1994. padding-top: 16px;
  1995. white-space: nowrap;
  1996. /* 禁止换行 */
  1997. overflow: hidden;
  1998. /* 隐藏超出部分 */
  1999. text-overflow: ellipsis;
  2000. /* 超出部分显示省略号 */
  2001. >strong {
  2002. display: inline-block;
  2003. width: 24px;
  2004. height: 24px;
  2005. line-height: 24px;
  2006. background-color: #cecece;
  2007. padding-left: 6px;
  2008. box-sizing: border-box;
  2009. font-family: Source Han Sans, Source Han Sans;
  2010. font-weight: 500;
  2011. font-size: 18px;
  2012. color: #FFFFFF;
  2013. font-style: normal;
  2014. text-transform: none;
  2015. }
  2016. >em {
  2017. display: inline-block;
  2018. width: 6px;
  2019. height: 6px;
  2020. border-radius: 10px;
  2021. border: 2px solid #8CBA86;
  2022. }
  2023. >span {
  2024. width: 380px;
  2025. height: 22px;
  2026. font-family: PingFang SC, PingFang SC;
  2027. font-weight: 500;
  2028. font-size: 18px;
  2029. color: #333333;
  2030. line-height: 21px;
  2031. text-align: left;
  2032. font-style: normal;
  2033. text-transform: none;
  2034. padding-left: 9px;
  2035. }
  2036. >span:hover {
  2037. color: #139609;
  2038. a {
  2039. color: #088f04;
  2040. }
  2041. }
  2042. }
  2043. }
  2044. // 轮播图
  2045. .banner {
  2046. width: 380px;
  2047. height: 214px;
  2048. margin-top: 45px;
  2049. }
  2050. .banner_b_img {
  2051. // 图片部分
  2052. .photo {
  2053. height: 104px;
  2054. margin-top: 10px;
  2055. display: flex;
  2056. }
  2057. .photoL,
  2058. .photoR {
  2059. float: left;
  2060. width: 185px;
  2061. height: 104px;
  2062. position: relative;
  2063. img {
  2064. width: 185px;
  2065. height: 104px;
  2066. }
  2067. span {
  2068. position: absolute;
  2069. top: 0;
  2070. left: 0;
  2071. display: inline-block;
  2072. padding-left: 7px;
  2073. box-sizing: border-box;
  2074. width: 185px;
  2075. height: 22px;
  2076. background-color: rgba(0, 0, 0, 0.5);
  2077. font-weight: 500px;
  2078. font-size: 14px;
  2079. color: #FFFFFF;
  2080. line-height: 22px;
  2081. white-space: nowrap;
  2082. /* 禁止换行 */
  2083. overflow: hidden;
  2084. /* 隐藏超出部分 */
  2085. text-overflow: ellipsis;
  2086. /* 超出部分显示省略号 */
  2087. a {
  2088. color: #fff;
  2089. }
  2090. }
  2091. }
  2092. .photoL {
  2093. margin-right: 10px;
  2094. }
  2095. }
  2096. }
  2097. }
  2098. // 标题
  2099. .scienceTitle {
  2100. height: 37px;
  2101. h5 {
  2102. float: left;
  2103. width: 96px;
  2104. height: 34px;
  2105. font-family: PingFang SC, PingFang SC;
  2106. font-weight: 600;
  2107. font-size: 24px;
  2108. color: #000000;
  2109. line-height: 28px;
  2110. text-align: left;
  2111. font-style: normal;
  2112. text-transform: none;
  2113. margin-right: 20px;
  2114. }
  2115. >p {
  2116. float: left;
  2117. height: 37px;
  2118. line-height: 30px;
  2119. display: flex;
  2120. >span {
  2121. display: inline-block;
  2122. //height: 20px;
  2123. line-height: 20px;
  2124. text-align: center;
  2125. margin: 4px 0px 3px;
  2126. padding: 0 20px;
  2127. //border-right: 1px solid #ccc;
  2128. font-weight: 500;
  2129. font-size: 20px;
  2130. cursor: pointer;
  2131. padding-bottom: 11px;
  2132. // >a {
  2133. // display: inline-block;
  2134. // padding-bottom: 11px;
  2135. // font-family: PingFang SC, PingFang SC;
  2136. // font-weight: 500;
  2137. // font-size: 20px;
  2138. // color: #666666;
  2139. // line-height: 20px;
  2140. // font-style: normal;
  2141. // text-transform: none;
  2142. // box-sizing: border-box;
  2143. // }
  2144. .current {
  2145. color: #139602;
  2146. border-bottom: 1px solid #139602;
  2147. }
  2148. }
  2149. >span:nth-child(4) {
  2150. border-right: none;
  2151. }
  2152. >span:hover>a {
  2153. color: #139602;
  2154. border-bottom: 1px solid #139602;
  2155. }
  2156. }
  2157. }
  2158. .box {
  2159. width: 790px;
  2160. height: 570px;
  2161. position: relative;
  2162. overflow: hidden;
  2163. }
  2164. .fade-in {
  2165. animation: fadeIn 1s ease-in-out;
  2166. }
  2167. .fade-enter-from,
  2168. .fade-leave-to {
  2169. opacity: 0;
  2170. }
  2171. .fade-enter-to,
  2172. .fade-leave-from {
  2173. opacity: 1;
  2174. }
  2175. .fade-enter-active,
  2176. .fade-leave-active {
  2177. transition: opacity 1s ease;
  2178. }
  2179. .scienceListBox {
  2180. width: 3160px;
  2181. height: 570px;
  2182. position: absolute;
  2183. top: 0;
  2184. left: 0;
  2185. transition: all 3s linear 0;
  2186. }
  2187. // 标题下列表
  2188. .scienceList {
  2189. width: 790px;
  2190. height: 570px;
  2191. float: left;
  2192. margin-top: 17px;
  2193. >li {
  2194. width: 250px;
  2195. height: 276px;
  2196. float: left;
  2197. margin-right: 20px;
  2198. position: relative;
  2199. img {
  2200. width: 250px;
  2201. height: 220px;
  2202. border-top-left-radius: 40px;
  2203. border-bottom-right-radius: 40px;
  2204. }
  2205. >p {
  2206. height: 50px;
  2207. width: 248px;
  2208. font-family: PingFang SC, PingFang SC;
  2209. font-weight: 600;
  2210. font-size: 18px;
  2211. color: #333333;
  2212. line-height: 24px;
  2213. text-align: left;
  2214. font-style: normal;
  2215. text-transform: none;
  2216. display: -webkit-box;
  2217. -webkit-box-orient: vertical;
  2218. -webkit-line-clamp: 2;
  2219. /* 限制显示的行数 */
  2220. overflow: hidden;
  2221. text-overflow: ellipsis;
  2222. }
  2223. // >p:hover {
  2224. // color: #139602;
  2225. // }
  2226. }
  2227. >li:hover {
  2228. color: #088f04;
  2229. >p:hover {
  2230. a {
  2231. color: #088f04;
  2232. }
  2233. // color: #139602;
  2234. }
  2235. }
  2236. >li:nth-child(3),
  2237. >li:nth-child(6) {
  2238. margin-right: 0;
  2239. }
  2240. >li::before {
  2241. content: "";
  2242. display: inline-block;
  2243. width: 40px;
  2244. height: 20px;
  2245. position: absolute;
  2246. top: 0;
  2247. right: 0;
  2248. background-image: url("../../static/images/Component 209.png");
  2249. }
  2250. }
  2251. .active {
  2252. border-bottom: 3px solid #139602;
  2253. height: 36px;
  2254. display: inline-block;
  2255. }
  2256. .noSelect {
  2257. border-bottom: 3px solid #fff;
  2258. height: 36px;
  2259. display: inline-block;
  2260. }
  2261. </style>